<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.global.js"></script>
</head>
<body>
    <div class="app">
        <ul>
            <h1 v-for="i in hdlist">
                {{i}}
            </h1>
        </ul>
        <button @click.once="addbtn">我是最多新增一行标题按钮</button>
        <hr>
        <button @click="addbtn1">新增按钮的按钮</button>
        <hr>
        <button v-for="i in btns">{{i}}</button>
        
    </div>
    <script>
        const { createApp } = Vue
        createApp({
            data(){
                return{
                    hdlist:[],
                    btns:[]
                }
            },
            methods:{
                addbtn(){
                    this.hdlist.push("我是标题")
                },
                addbtn1(){
                    this.btns.push('新增按钮');
                }
            }
        }).mount('.app')
    </script>
</body>
</html>